<template>
  <div>
      <table>
      <tr>
        <td colspan="8">客户信息录入</td>
      </tr>
      <tr>
        <td>姓名：</td>
        <td colspan="3">1111</td>

        <td>身份证号码：</td>
        <td colspan="3"></td>
      </tr>
      <tr>
        <td>联系电话：</td>
        <td colspan="3">1111</td>

        <td>客户来源：</td>
        <td colspan="3">
          <button class="bt">
            <el-dropdown @command="handleCommand">
              <span class="el-dropdown-link">
                <i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="a">111</el-dropdown-item>
                <el-dropdown-item command="b">222</el-dropdown-item>
                <el-dropdown-item command="c">333</el-dropdown-item>
                <el-dropdown-item command="d" disabled>444</el-dropdown-item>
                <el-dropdown-item command="e" divided>555</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </button>
        </td>
      </tr>
      <tr>
        <td>联系地址：</td>
        <td colspan="3">1111</td>

        <td>单位名称：</td>
        <td colspan="3"></td>
      </tr>
      <tr>
        <td>单位性质：</td>
        <td colspan="3">
          1111
          <button class="bt">
            <el-dropdown @command="handleCommand">
              <span class="el-dropdown-link">
                <i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="a">111</el-dropdown-item>
                <el-dropdown-item command="b">222</el-dropdown-item>
                <el-dropdown-item command="c">333</el-dropdown-item>
                <el-dropdown-item command="d" disabled>444</el-dropdown-item>
                <el-dropdown-item command="e" divided>555</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </button>
        </td>

        <td>户籍地址：</td>
        <td colspan="3"></td>
      </tr>
      <tr>
        <td>客户类型：</td>
        <td colspan="7" class="r">
          <el-radio>申请贷款客户</el-radio>
          <el-radio disabled>进行中客户</el-radio>
          <el-radio>过往客户</el-radio>
        </td>
      </tr>
      <tr>
        <td>申请金额：</td>
        <td colspan="3">1111</td>

        <td>申请日期：</td>
        <td colspan="3">
          <button class="bt">
            <el-dropdown @command="handleCommand">
              <span class="el-dropdown-link">
                <i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="a">111</el-dropdown-item>
                <el-dropdown-item command="b">222</el-dropdown-item>
                <el-dropdown-item command="c">333</el-dropdown-item>
                <el-dropdown-item command="d" disabled>444</el-dropdown-item>
                <el-dropdown-item command="e" divided>555</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </button>
        </td>
      </tr>
      <tr>
        <td>贷款类型：</td>
        <td colspan="3">1111</td>
        <td colspan="4">
          <button class="bt">
            <el-dropdown @command="handleCommand">
              <span class="el-dropdown-link">
                <i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="a">111</el-dropdown-item>
                <el-dropdown-item command="b">222</el-dropdown-item>
                <el-dropdown-item command="c">333</el-dropdown-item>
                <el-dropdown-item command="d" disabled>444</el-dropdown-item>
                <el-dropdown-item command="e" divided>555</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </button>
        </td>
      </tr>
      <tr>
        <td>抵押物情况：</td>
        <td colspan="7">1111</td>
      </tr>
    </table>

    <div>
      <el-upload
        class="upload-demo"
        action="https://jsonplaceholder.typicode.com/posts/"
        :on-change="handleChange"
        :file-list="fileList"
      >
        <el-button size="small" type="primary">上传附件（选填）</el-button>
        <div slot="tip" class="el-upload__tip">
          注意：1、单张图片大小不能超过2M；<br>2、图片格式必须为jpg,png
        </div>
      </el-upload>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      fileList: [
        {
          name: "food.jpeg",
          url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
        },
        {
          name: "food2.jpeg",
          url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
        },
      ],
    };
  },
  methods: {
    handleCommand(command) {
      this.$message("click on item " + command);
    },

    handleChange(file, fileList) {
      this.fileList = fileList.slice(-3);
    },
  },

}
</script>

<style lang="scss" scoped>
table {
  border-collapse: collapse;
  width: 100%;
  height: 100%;
}
td {
  width: 100px;
  height: 50px;
  border: 1px solid #000;
}
.el-dropdown-link {
  cursor: pointer;
  color: #409eff;
}
.el-icon-arrow-down {
  font-size: 12px;
}
// .bt{
//   width: 40px;
//   height: 90px;
// }
.r {
  text-align: center;
}

</style>